module.exports = function ($scope, $state, $resource, $modal, toaster ){
    
    $scope.tour_list = function (pageNo){
        var para = {
            'pageNo': pageNo || $scope.currentPage,
            'pageSize': $scope.itemsPerPage
        }
        
          $scope.list = [];
    
          $resource('/api/as/goc/tourbase/findPriceUpList', {}, {}).save(para,function (res) {
        
            if (res.errcode == 0) {
                $scope.list = res.data.results;
                console.log($scope.list);
            }
            
            

          });
    } 
   
    init();
    //初始化列表
    function init(){
        $scope.currentPage = 1;		//当前页码
        $scope.itemsPerPage = 10;	//每页显示几条
        $scope.searchform = {};
        $scope.tour_list();
    }

     //查看
     $scope.getpriceinfo = function(info) {
      console.log('222222222222');
        var modalInstance = $modal.open({
            template: require('../views/expriceinfo.html'),
            controller: 'expriceinfo',
            size: 'lg',
            resolve: {
                item : function () {
                    return info;
                },
                flag : function () {
                    return info == 1;
                }
            }
        });
        
        //关闭模态框刷新页面
        modalInstance.result.then(function() {
            init();
        });
    }

   
      


};